Skip to content

X25519: standard requires masking of top bit#10713

Open
SparkiDev wants to merge 1 commit into
wolfSSL:masterfrom
SparkiDev:curve25519_hibit_mask
Open

X25519: standard requires masking of top bit#10713
SparkiDev wants to merge 1 commit into
wolfSSL:masterfrom
SparkiDev:curve25519_hibit_mask

Conversation

@SparkiDev

Copy link
Copy Markdown
Contributor

Description

Instead of failing when top bit is set, the standard and current research says to mask it.
WOLFSSL_X25519_NO_MASK_PEER is added to allow the rejection when required.

Fixes zd#3556

Testing

Ran standard tests.
./configure --disable-shared --enable-curve25519
./configure --disable-shared --enable-curve25519 CFLAGS=-DWOLFSSL_X25519_NO_MASK_PEER

@SparkiDev SparkiDev self-assigned this Jun 17, 2026

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #10713

Scan targets checked: wolfcrypt-bugs, wolfcrypt-src, wolfssl-bugs, wolfssl-src

Findings: 2
2 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Findings are non-blocking.

Comment thread wolfcrypt/src/curve25519.c Outdated
Comment thread tests/api/test_curve25519.c
@SparkiDev SparkiDev force-pushed the curve25519_hibit_mask branch from 7fabda2 to 6d7fce3 Compare June 17, 2026 04:23
Instead of failing when top bit is set, the standard and current research says to mask it.
WOLFSSL_X25519_NO_MASK_PEER is added to allow the rejection when required.
@SparkiDev SparkiDev force-pushed the curve25519_hibit_mask branch from 6d7fce3 to e017e6c Compare June 17, 2026 05:37
@SparkiDev

Copy link
Copy Markdown
Contributor Author

Jenkins: retest this please

Agent offline

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants